-
Notifications
You must be signed in to change notification settings - Fork 100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow to override internal static fields #578
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Jorge Bescos Gascon <[email protected]>
Signed-off-by: Jorge Bescos Gascon <[email protected]>
if (context == null) | ||
context = new MessageContext(part); | ||
return context; | ||
public MessageContext getMessageContext() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why was synchronized
removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no point to have it synchronized because the context is instanced now in the constructor. It is not possible that 2 threads obtain a different instance by calling that method.
api/pom.xml
Outdated
@@ -404,6 +404,8 @@ Use is subject to <a href="{@docRoot}/doc-files/speclicense.html" target="_top"> | |||
<configuration> | |||
<forkCount>2</forkCount> | |||
<reuseForks>false</reuseForks> | |||
<!-- Test service loader is not loaded if modules are enabled --> | |||
<useModulePath>false</useModulePath> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for this to work, tests need their own module-info, there are more ways to make it work
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added, thank you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jmehrens how does this look to you?
Signed-off-by: Jorge Bescos Gascon <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the version. Much cleaner than what we started with.
prop.put("mail.mime.decodefilename", Boolean.TRUE); | ||
prop.put("mail.mime.ignoremultipartencoding", Boolean.FALSE); | ||
prop.put("mail.mime.allowutf8", Boolean.FALSE); | ||
prop.put("mail.mime.cachemultipart", Boolean.FALSE); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I recall correctly, we are expecting String key and String values. It must work because toString gets called on the value.
Signed-off-by: Jorge Bescos Gascon <[email protected]>
Notice that these changes breaks the TCK and I created a PR for that: It is about setting the system property at the begging of the test. As mail-tck is going to dramatically change here: jakartaee/mail-tck#29 |
Signed-off-by: Jorge Bescos Gascon <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For #589 we'll need an override for InternetAddress utf8 boolean.
@@ -1002,7 +1003,13 @@ protected MimeBodyPart createMimeBodyPart(InternetHeaders headers, | |||
*/ | |||
protected MimeBodyPart createMimeBodyPart(InputStream is) | |||
throws MessagingException { | |||
return new MimeBodyPart(is); | |||
if (ds != null && ds instanceof MimePartDataSource) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should simply be:
if (ds instanceof MessageAware)
followed by a cast to MessageAware instead of MimePartDataSource
Signed-off-by: Jorge Bescos Gascon <[email protected]>
Setting this as a draft meanwhile this comment is not implemented: #578 (review) |
I have closed this PR #515 and address it in this new PR. This is because of the conflicts after the split of API and Implementation.